//
//  ECAddCompanyTableViewCell.m
//  ECERP.CRM
//
//  Created by Mac on 2018/10/19.
//  Copyright © 2018年 Mac. All rights reserved.
//

#import "ECAddCompanyTableViewCell.h"

@interface ECAddCompanyTableViewCell ()

@property (nonatomic,strong) CAShapeLayer *lineLayer;

@end

@implementation ECAddCompanyTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.selectionStyle = UITableViewCellSelectionStyleNone;
        
        [self.contentView addSubview:self.nameLab];
        [self.contentView addSubview:self.textF];
        [self.contentView.layer addSublayer:self.lineLayer];
        
    }
    return self;
}


- (UILabel *)nameLab
{
    if (!_nameLab) {
        _nameLab=[[UILabel alloc]initWithFrame:CGRectMake(12, 15, 120*PX_RELATIVE375, 14)];
        _nameLab.textColor = ECCOLOR_FONT_HEADLINE;
        _nameLab.font = ECFONT(14);
    }
    return _nameLab;
}


- (UITextField *)textF
{
    if (!_textF) {
        _textF=[[UITextField alloc]initWithFrame:CGRectMake(_nameLab.right, 15, ECSCREEN_WIDTH-_nameLab.width-24, 15)];
        _textF.font=ECFONT(14);
        _textF.textColor=ECCOLOR_FONT_EXPLAIN;
    }
    return _textF;
}

- (CAShapeLayer *)lineLayer
{
    if (!_lineLayer) {
        _lineLayer=[CAShapeLayer layer];
        _lineLayer.borderWidth = 0.5;
        _lineLayer.borderColor = ECCOLOR_TEXTBOTTOMLINE.CGColor;
        _lineLayer.frame=CGRectMake(12, 48, ECSCREEN_WIDTH-24, 0.5);
    }
    return _lineLayer;
}


@end
